GBML manual / Save

save_commit

Writes the in-RAM working copy to SRAM - the one call that actually makes a save_set survive a power cycle.

Syntax

save_commit()

Returns

Nothing.

Description

Writes the in-RAM working copy to SRAM - the one call that actually makes anything set with save_set survive a power cycle. The store's own format carries a version and a project stamp, and refuses (resets to empty) a save written by a different project or an incompatible layout, rather than risk misreading it. This is an explicit action, not autosave-on-every-save_set - call it from wherever a project's own design says a save actually happens (a SAVE menu, a checkpoint), not after every single change.

Example

save_commit();

Writes everything currently held in the working copy to SRAM - the moment a save actually becomes permanent.

On the GBA

The store’s format carries a version and a project stamp, and refuses (resets to empty) a save written by a different project or an incompatible layout - an explicit commit, not autosave-on-every-set, the same "SAVE menu action" shape a project’s own UI expects.

See also: save_set